﻿<client:PanelWidget x:Class="Chronos.DotNet.BasicProfiler.Client.Win.ModulesWidget"
                    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:client="clr-namespace:Chronos.Client.Win;assembly=Chronos.Client.Win"
                    xmlns:behaviors="clr-namespace:Chronos.Client.Win.Presentation.Behaviors;assembly=Chronos.Client.Win"
                    Title="Modules">
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="*" />
            <RowDefinition Height="Auto" />
        </Grid.RowDefinitions>
        <ListView Grid.Row="0" ItemsSource="{Binding Model.Units}" SelectedItem="{Binding Model.SelectedUnit}" IsSynchronizedWithCurrentItem="True"
                  behaviors:GridViewSort.AutoSort="True"
                  VirtualizingStackPanel.IsVirtualizing="True">
            <ListView.View>
                <GridView>
                    <GridViewColumn Header="Name" DisplayMemberBinding="{Binding Name}" behaviors:GridViewSort.PropertyName="Name" />
                    <!--<GridViewColumn Header="Load Result" DisplayMemberBinding="{Binding LoadResult}" behaviors:GridViewSort.PropertyName="LoadResult" />-->
                </GridView>
            </ListView.View>
        </ListView>
        <Grid Grid.Row="1">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto" />
                <ColumnDefinition Width="*" />
                <ColumnDefinition Width="Auto" />
                <ColumnDefinition Width="Auto" />
            </Grid.ColumnDefinitions>
            <TextBlock Grid.Column="0" Text="Search:" />
            <TextBox Grid.Column="1" Text="{Binding Model.SelectedUnitFilter.Value, UpdateSourceTrigger=PropertyChanged}" />
            <ComboBox Grid.Column="2" ItemsSource="{Binding Model.UnitFilters}" SelectedItem="{Binding Model.SelectedUnitFilter}" DisplayMemberPath="DisplayName" />
        </Grid>
    </Grid>
</client:PanelWidget>
